import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

import UI_Router from '@/views/UI_Router'
import Contacts from '@/views/Contacts'
import About from '@/views/About'
import All_contacts from '@/views/contactsSon/All_contacts'
import Alice from '@/views/contactsSon/Alice'
import Bob from '@/views/contactsSon/Bob'
import Blog from '@/views/contactsSon/bobSon/Blog'
import Fax from '@/views/contactsSon/bobSon/Fax'

const router = new VueRouter({
  routes: [
    {
      path: '/',
      component: UI_Router
    },
    {
      path: '/contacts',
      component: Contacts,
      children: [
        {
          path: 'all_contacts',
          component: All_contacts
        },
        {
          path: 'alice',
          component: Alice
        },
        {
          path: 'bob',
          component: Bob,
          children: [
            {
              path: 'blog',
              component: Blog
            },
            {
              path: 'fax',
              component: Fax
            }
          ]
        }
      ]
    },
    {
      path: '/about',
      component: About
    }
  ]
})

export default router
